package cn.wolfcode.shop.domain;

import com.alibaba.fastjson.JSON;
import lombok.Getter;
import lombok.Setter;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Getter@Setter
public class SkuProperty extends BaseDomain{
    private Long catalogId;
    private String name;
    private Integer sort;

    private List<SkuPropertyValue> skuPropertyValueList;

    public String getJsonData(){
        Map<String, Object> map = new HashMap<String, Object>();
        map.put("catalogId", catalogId);
        map.put("name", name);
        map.put("id", super.getId());
        map.put("sort", sort);
        return JSON.toJSONString(map);
    }
}